using System;
using System.Windows.Forms;
using System.Drawing;

namespace HIS
{
    public class CallPatientForm : Form
    {
        private DataGridView dgvWaitingList;
        private Button btnCall;
        private Button btnCancelCall;
        private Button btnRecall;
        private Button btnAccept;
        private TextBox txtCallInfo;
        private ComboBox cmbLanguage;
        private NumericUpDown numCallTimes;

        public CallPatientForm()
        {
            InitializeComponents();
        }

        private void InitializeComponents()
        {
            // 窗体设置
            this.Text = "叫号接诊";
            this.Size = new Size(800, 600);
            this.StartPosition = FormStartPosition.CenterScreen;

            // 候诊列表
            dgvWaitingList = new DataGridView
            {
                Location = new Point(20, 20),
                Size = new Size(760, 300),
                AllowUserToAddRows = false,
                AllowUserToDeleteRows = false,
                ReadOnly = true,
                SelectionMode = DataGridViewSelectionMode.FullRowSelect
            };

            // 添加列
            dgvWaitingList.Columns.AddRange(new DataGridViewColumn[] {
                new DataGridViewTextBoxColumn { Name = "就诊卡号", HeaderText = "就诊卡号", Width = 100 },
                new DataGridViewTextBoxColumn { Name = "就诊号", HeaderText = "就诊号", Width = 80 },
                new DataGridViewTextBoxColumn { Name = "姓名", HeaderText = "姓名", Width = 80 },
                new DataGridViewTextBoxColumn { Name = "性别", HeaderText = "性别", Width = 60 },
                new DataGridViewTextBoxColumn { Name = "年龄", HeaderText = "年龄", Width = 60 },
                new DataGridViewTextBoxColumn { Name = "医保类别", HeaderText = "医保类别", Width = 100 }
            });

            // 叫号设置区域
            GroupBox gbCallSettings = new GroupBox
            {
                Text = "叫号设置",
                Location = new Point(20, 340),
                Size = new Size(300, 100)
            };

            // 语种选择
            Label lblLanguage = new Label
            {
                Text = "语种：",
                Location = new Point(10, 25),
                AutoSize = true
            };

            cmbLanguage = new ComboBox
            {
                Location = new Point(60, 22),
                Size = new Size(100, 25),
                DropDownStyle = ComboBoxStyle.DropDownList
            };
            cmbLanguage.Items.AddRange(new string[] { "普通话", "粤语", "英语" });

            // 叫号次数
            Label lblCallTimes = new Label
            {
                Text = "次数：",
                Location = new Point(170, 25),
                AutoSize = true
            };

            numCallTimes = new NumericUpDown
            {
                Location = new Point(220, 22),
                Size = new Size(60, 25),
                Minimum = 1,
                Maximum = 5,
                Value = 1
            };

            gbCallSettings.Controls.AddRange(new Control[] { lblLanguage, cmbLanguage, lblCallTimes, numCallTimes });

            // 按钮区域
            btnCall = new Button
            {
                Text = "叫号",
                Location = new Point(340, 360),
                Size = new Size(80, 30)
            };

            btnCancelCall = new Button
            {
                Text = "取消叫号",
                Location = new Point(440, 360),
                Size = new Size(80, 30)
            };

            btnRecall = new Button
            {
                Text = "再叫号",
                Location = new Point(540, 360),
                Size = new Size(80, 30)
            };

            btnAccept = new Button
            {
                Text = "接诊",
                Location = new Point(640, 360),
                Size = new Size(80, 30)
            };

            // 叫号信息显示区域
            txtCallInfo = new TextBox
            {
                Location = new Point(20, 460),
                Size = new Size(760, 100),
                Multiline = true,
                ReadOnly = true,
                Font = new Font("微软雅黑", 12, FontStyle.Bold)
            };

            // 添加控件到窗体
            this.Controls.AddRange(new Control[] {
                dgvWaitingList,
                gbCallSettings,
                btnCall,
                btnCancelCall,
                btnRecall,
                btnAccept,
                txtCallInfo
            });
        }

        private void InitializeComponent()
        {
            this.SuspendLayout();
            // 
            // CallPatientForm
            // 
            this.ClientSize = new System.Drawing.Size(376, 289);
            this.Name = "CallPatientForm";
            this.ResumeLayout(false);

        }
    }
} 